<template>
<div>
    <h2>借款项目列表</h2>
    <BorrowCommon v-slot="info">
        <a href="#" @click="BorrowMoney(info.id)">借款</a>
    </BorrowCommon>
</div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';
import BorrowCommon from '../BorrowMoney/BorrowCommon.vue'

//创建路由实例
const router=useRouter(); 

//完成跳转到借款页面
const BorrowMoney=(Bid:number)=>{
    router.push({
        name:'AddUserBorrowMoney',
        params:{
            Bid:Bid
        }
    })
}
</script>